package cn.itcast.bos.action.system;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionContext;

import cn.itcast.bos.domain.system.Role;
import cn.itcast.bos.service.system.RoleService;
import cn.itcast.bos.utils.BaseAction;

public class RoleAction extends BaseAction<Role> {
	@Autowired
	private RoleService roleService;
	@Action(value="role_list",results={@Result(name="success",type="json")})
	public String list(){
		List<Role> list = roleService.findAll();
		ActionContext.getContext().getValueStack().push(list);
		return SUCCESS;
	}
	
}
